package moocloudstudio.minder.util;

import cn.hutool.core.util.IdUtil;
import moocloudstudio.minder.entity.MinderEntity;
import moocloudstudio.minder.enums.BooleanEnum;

import java.time.LocalDateTime;

public class EntityUtil {
    public static void setCreateMetaFields(MinderEntity entity){
        entity.setId(IdUtil.getSnowflakeNextIdStr());
        entity.setCreatedAt(LocalDateTime.now());
        entity.setDeleted(BooleanEnum.False.getValue());
    }
}
